package br.edu.ufcg.lp2;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class VoteTest {

	Vote t1;
	Vote t2;
	Vote t3;
	User user;
	
	@Before
	public void setUp() throws Exception {
		user = new User("User");
		t1 = new Vote(Vote.LIKE, user);
		t2 = new Vote(Vote.HALFLIKE, user);
		t3 = new Vote(Vote.DISLIKE, user);
	}

	@Test
	public void testGetRating() {
		assertEquals(1, t1.getRating());
		assertEquals(0, t2.getRating());
		assertEquals(-1, t3.getRating());
	}

	@Test
	public void testGetUser() {
		assertEquals(user, t1.getUser());
		assertEquals(user, t2.getUser());
		assertEquals(user, t3.getUser());
	}

}







